package com.feigndemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.feigndemo.consumer.FeignDemoServiceConsumer;
import com.feigndemo.pojo.FeignDemoVO;

@SpringBootApplication
@EnableFeignClients
@RestController
@EnableDiscoveryClient
public class App {
	
	@Autowired
	FeignDemoServiceConsumer demoService;
	
	@RequestMapping("/hello")
	public FeignDemoVO hello() {
		return demoService.helloFeign("111");
	}

	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}

}
